home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-10-25 | 24.2 KB | 666 lines | [TEXT/MPS ] |
- {[a-,body+,h-,o=100,r+,rec+,t=4,u+,#+,j=20/57/1$,n-]}
- { UTEView.p }
- { Copyright © 1986-1990 Apple Computer, Inc. All rights reserved. }
-
- {$IFC UNDEFINED UsingIncludes}
- {$SETC UsingIncludes := FALSE}
- {$ENDC}
-
- {$IFC NOT UsingIncludes}
- UNIT UTEView;
-
- INTERFACE
- {$ENDC}
-
- {$IFC UNDEFINED __TEView__}
- {$SETC __TEView__ := FALSE}
- {$ENDC}
-
- {$IFC NOT __TEView__}
- {$SETC __TEView__ := TRUE}
-
- { • Auto-Include the requirements for this unit's interface. }
- {$SETC UTEViewIncludes := UsingIncludes}
- {$SETC UsingIncludes := TRUE}
- {$I+}
- {$IFC UNDEFINED __UMacApp__} {$I UMacApp.p} {$ENDC}
- {$SETC UsingIncludes := UTEViewIncludes}
-
- CONST
- kUnlimited = MAXINT; { The maximum number of characters in the
- fText of a TTEView object }
-
- kWithStyle = TRUE; { Parameters to TTEView.ITEView }
- kWithoutStyle = FALSE;
- kSaveCurrentChars = TRUE; { Parameter to ITECommand }
-
- Chr00 = CHR(0); { Needed for ControlCharSet }
- Chr1F = CHR($1F);
-
- kMinAhead = 96; { Default value for fMinAhead }
-
-
- TYPE
- ControlCharSet = SET OF Chr00..Chr1F;
-
- TEViewTemplate = PACKED RECORD
- itsStyleType: BOOLEAN;
- itsAutoWrap: BOOLEAN;
- itsAcceptsChanges: BOOLEAN;
- itsFreesText: BOOLEAN;
- filler1: 0..4095;
- itsKeyCmdNumber: INTEGER;
- itsMaxChars: INTEGER;
- itsInset: Rect;
- itsJustification: INTEGER;
- itsTextFace: Style;
- itsTextSize: INTEGER;
- itsTextColor: RGBColor;
- itsFontName: Str255; { Actually a variable length P-String }
- END;
- TEViewTemplatePtr = ^TEViewTemplate;
-
- {$IFC qHasForward}
- TTECommand = OBJECT; FORWARD;
- TTETypingCommand = OBJECT; FORWARD;
- TTEStyleCommand = OBJECT; FORWARD;
- {$EndC}
-
- TTEView = OBJECT (TView) { TTEView is a view subclass representing a
- TextEdit record. TextEdit is the simple
- text-editing facility built into the
- Macintosh ROM. The purpose of a TEView is
- to make TextEdit function properly in a
- MacApp environment, for things like
- scrolling, printing, page breaks, and
- command handling }
-
- fHTE: TEHandle; { Handle to the actual TextEdit object }
-
- fText: Handle; { The text in the TEHandle }
- fSavedTEHandle: Handle; { Saved handle from TENew }
-
- fInset: Rect; { Amount to inset text from edges of view }
-
- fKeyCmdNumber: CmdNumber; { Will be used as the string number for
- "Undo Typing" }
-
- fMaxChars: INTEGER; { Maximum number of chars to accept into
- fText. Default is MAXINT; stuff to
- different value if you want to limit max
- chars to fewer than MAXINT }
-
- fLastHeight: LONGINT; { Last checked height of record. If the
- record is stylish, this represents the
- height in pixels. For old-style records,
- equals number of lines. }
-
- fLastWidth: LONGINT; { Last checked width of record. Not currently
- used If the TE is styled, this represents the
- width in pixels. }
-
- fTypingCommand: TTETypingCommand; { The current TE Typing command relating to
- me, if any }
-
- fTextStyle: TextStyle; { Current style of text }
-
- fJustification: INTEGER; { Current justification of text record }
-
- fAcceptsChanges: BOOLEAN; { Set to FALSE to have text which will not
- accept any change, such as text on the
- Clipboard, or perhaps received mail }
- fStyleType: BOOLEAN; { Set to kWithStyle if record is styled }
- fAutoWrap: BOOLEAN; { Set to FALSE for line wrapping at CR's
- only }
- fFreeText: BOOLEAN; { Determines if fText should be freed on
- Free. }
- fSpecsChanged: BOOLEAN; { Something recently happened which could
- effect font/style/size/color menu item
- updating. Should be reset to FALSE when
- application has taken the appropriate
- action. }
- fLastPageBreak: INTEGER; { Caches last page break computed. }
- fLastLine: INTEGER; { Last line of text of the last page break }
- fControlChars: ControlCharSet; { Control chars accepted in text }
- fMinAhead: INTEGER; { Minimum amount by which to autoscroll ahead
- when scrolling selection into view. (When typing
- etc. }
-
- { Initialize and Free }
-
- PROCEDURE TTEView.ITEView(itsDocument: TDocument; { OK to be NIL, if view will
- belong to a documentless window
- }
- itsSuperView: TView; { The view in which this view is
- contained }
- itsLocation: VPoint; { Location in its superview }
- itsSize: VPoint; { Size of view }
- itsHDeterminer: SizeDeterminer; { How to width of the view
- is to be determined }
- itsVDeterminer: SizeDeterminer; { How the height of the
- view is to be determined
- }
- itsInset: Rect; { Amount to inset text }
- itsTextStyle: TextStyle; { Initial text style }
- itsJustification: INTEGER; { Its justification }
- itsStyleType: BOOLEAN; { Whether or not record is styled }
- itsAutoWrap: BOOLEAN { FALSE if newline occurs at CR only
- }
- );
- { For Initialization of procedurally created TEView. }
-
- PROCEDURE TTEView.IRes(itsDocument: TDocument;
- itsSuperView: TView;
- VAR itsParams: Ptr); OVERRIDE;
- { Initialize a TTEView via a 'view' resource. }
-
- PROCEDURE TTEView.WRes(theResource: ViewRsrcHndl;
- VAR itsParams: Ptr); OVERRIDE;
- { Write the object out to a view resource. }
-
- PROCEDURE TTEView.WriteRes(theResource: ViewRsrcHndl;
- VAR itsParams: Ptr); OVERRIDE;
- { Set up the type and signature of this object and call WRes. }
-
- PROCEDURE TTEView.Free; OVERRIDE;
- { Frees the TERecord and optionally fText, then frees SELF }
-
- PROCEDURE TTEView.MakeTERecord;
- { Called with grafport properly set, to create the actual TE Record }
-
- { Commands and Menus }
-
- FUNCTION TTEView.DoKeyCommand(ch: Char;
- aKeyCode: INTEGER;
- VAR info: EventInfo): TCommand; OVERRIDE;
- { Handles keystrokes }
-
- FUNCTION TTEView.DoMakeEditCommand(aCmdNumber: CmdNumber): TTECommand;
- { Make a command for handling edit menu stuff }
-
- FUNCTION TTEView.DoMakeStyleCommand(aStyle: TextStyle;
- itsCmdNumber: CmdNumber;
- itsMode: INTEGER): TTEStyleCommand;
- { Make a style change command }
-
- FUNCTION TTEView.DoMakeTypingCommand(ch: Char): TTETypingCommand;
- { Make a typing command for handling keystrokes }
-
- FUNCTION TTEView.DoMenuCommand(aCmdNumber: CmdNumber): TCommand; OVERRIDE;
- { Handles menu commands }
-
- FUNCTION TTEView.DoMouseCommand(VAR theMouse: Point;
- VAR info: EventInfo;
- VAR hysteresis: Point): TCommand; OVERRIDE;
- { Handles mousepresses }
-
- PROCEDURE TTEView.DoneTyping;
- { No further typing can occur for the current typing command }
-
- PROCEDURE TTEView.DoSetupMenus; OVERRIDE;
- { Sets up menus }
-
- PROCEDURE TTEView.InstallSelection(wasActive, beActive: BOOLEAN); OVERRIDE;
- { Called at activate/deactivate time to get insertion-point-blinking right (or to
- highlight the selection) }
-
- PROCEDURE TTEView.ViewEnable(state, redraw: BOOLEAN); OVERRIDE;
- { Resets the view's idle }
-
- { Screen Display }
-
- FUNCTION TTEView.DoIdle(phase: IdlePhase): BOOLEAN; OVERRIDE;
- { Blinks the insertion point }
-
- FUNCTION TTEView.DoSetCursor(localPoint: Point;
- cursorRgn: RgnHandle): BOOLEAN; OVERRIDE;
- { Sets the cursor to the I-beam }
-
- PROCEDURE TTEView.Draw(area: Rect); OVERRIDE;
- { Draw the text in a frame or on the printed page }
-
- PROCEDURE TTEView.ShowReverted; OVERRIDE;
- { Make sure line starts are correct before redisplay }
-
- { Size Changes }
-
- PROCEDURE TTEView.BeInPort(itsPort: GrafPtr); OVERRIDE;
- { Now that a grafport is established for the view, tells TextEdit about it }
-
- PROCEDURE TTEView.BeInScroller(itsScroller: TScroller); OVERRIDE;
- { Gives us a chance to set the scroll parameters }
-
- PROCEDURE TTEView.CalcMinSize(VAR minSize: VPoint); OVERRIDE;
- { Compute the minimum size of the view }
-
- FUNCTION TTEView.CalcRealHeight: LONGINT;
- { Calculate true height of record, including last character if it is a carriage
- return }
-
- FUNCTION TTEView.CalcRealWidth: LONGINT;
- { Calculate true width of record. Only supported for NON-styled TE Records right now }
-
- PROCEDURE TTEView.ComputeSize(VAR newSize: VPoint); OVERRIDE;
- { Compute the actual size of the view }
-
- PROCEDURE TTEView.Resize(width, height: VCoordinate;
- invalidate: BOOLEAN); OVERRIDE;
- { Installs the new size for both the View and TextEdit }
-
- PROCEDURE TTEView.SynchView(redraw: BOOLEAN);
- { Keeps view metrics in synch after TextEdit operation. If redraw is true then
- ScrollSelectionIntoView is called to make sure the selection is visible.}
-
- { Clipboard }
-
- { NOTE -- These methods apply only to a TEView installed as the view in the Clipboard
- }
-
- FUNCTION TTEView.ContainsClipType(aType: ResType): BOOLEAN; OVERRIDE;
- { Determines whether the indicated clipboard type can be produced by the view }
-
- FUNCTION TTEView.GivePasteData(aDataHandle: Handle;
- dataType: ResType): LONGINT; OVERRIDE;
- { Supplies data to be PASTED by some requesting PASTE command }
-
- PROCEDURE TTEView.WriteToDeskScrap; OVERRIDE;
- { Produces TEXT data for the Desk Scrap when called upon to do so }
-
- { Miscellaneous }
-
- PROCEDURE TTEView.AutoScrolling(doScrolling: BOOLEAN);
- { Set TERecord auto scrolling to given value via TEAutoScroll }
-
- FUNCTION TTEView.ClikLoop: BOOLEAN;
- { Forwarded to from the global routine: ClickLoopForTTEView which was set as the
- TE's ClikLoop. Typically handles autoscrolling for the view. }
-
- PROCEDURE TTEView.CalcSelLoc(VAR selectionRect: Rect);
- { Calculates the location of the current Selection }
-
- PROCEDURE TTEView.ChangeWrap(newAutoWrap, redraw: BOOLEAN);
- { Changes auto-wrapping behavior, redrawing if requested }
-
- FUNCTION TTEView.ContinuousStyle(firstChar, lastChar: INTEGER;
- VAR mode: INTEGER;
- VAR aStyle: TextStyle): BOOLEAN;
- { Returns TRUE if the style of the characters within the given range is wholly
- continuous. The style attributes to check are specified by mode, which has the same
- meaning as in the TextEdit call TESetStyle. Attributes which are continuous are
- returned in aStyle, with the appropriate bits set in mode. Font style attribute
- bits are individually checked across the selection range, and returned set to 1 if
- that attribute is continuous. }
-
- PROCEDURE TTEView.ExtractStyles(VAR theStyles: TEStyleHandle;
- VAR theElements: STHandle);
- { Extract handles to style information for a TextEdit record, presumably for the
- purpose of storing the data to disk. Note that line heights can be recalculated,
- and as such don't need to be stored. }
-
- FUNCTION TTEView.ExtractText: Handle;
- { For sake of completeness. Extract handle to text, presumably for the purpose of
- storing the text externally (perhaps to disk). }
-
- PROCEDURE TTEView.RecalcText;
- { Tells TextEdit to recompute linestarts }
-
- PROCEDURE TTEView.ScrollSelectionIntoView;
- { Scrolls the selection into view -- called after Commands are done or undone If auto
- scrolling is on, calls TESelView to do the right thing }
-
- PROCEDURE TTEView.SetJustification(newJust: INTEGER;
- redraw: BOOLEAN);
- { Sets the TERecord to the given justification. If redraw is true then the view is
- redrawn by calling ForceRedraw. Otherwise it is assumed the called will get the
- view redrawn. }
-
- PROCEDURE TTEView.SetOneStyle(theStart, theEnd, theMode: INTEGER;
- theStyle: TextStyle;
- redraw: BOOLEAN);
- { Sets a text style continuously over a range. In unstylish TERecords, the style is
- set across the entire record. If redraw is true then the text is redrawn. }
-
- PROCEDURE TTEView.SetText(theText: Str255);
- { Convenience routine, to save from having to create a handle just to pass to
- StuffText. Note that if fSavedTEHandle already holds a saved handle, it will be
- disposed before StuffText is called. }
-
- FUNCTION TTEView.SpaceForStyles(rangeStart, rangeEnd: LONGINT): BOOLEAN;
- { Returns TRUE if there is enough memory to hold the styles over the given range in
- the TERecord }
-
- PROCEDURE TTEView.StuffStyles(theStyles: TEStyleHandle;
- theElements: STHandle);
- { Installs style information, presumably fetched from disk, into the TextEdit record.
- } { Installs text into the TextEdit
- record.Note that this destroys any
- existing style information -- StuffStyles
- should be called if styles are to be
- attached to this text information. }
-
- PROCEDURE TTEView.StuffText(theText: Handle);
- { Installs text into the TextEdit record. Note that this destroys any existing style
- information -- StuffStyles should be called if styles are to be attached to this
- text information }
-
- PROCEDURE TTEView.StuffTERects(newTERect: Rect);
- { installs "newTERect" as the dest & view rect of the TextEdit record }
-
- { Printing }
-
- FUNCTION TTEView.DoBreakFollowing(vhs: VHSelect;
- prevBreak: VCoordinate;
- VAR automatic: BOOLEAN): VCoordinate; OVERRIDE;
- { Computes the next page-break following 'prevBreak' in direction given by 'vhs' }
-
- PROCEDURE TTEView.DoCalcViewPerPage(VAR viewPerPage: VPoint); OVERRIDE;
- { Computes how much of the view is to be allocated to each printed page }
-
- PROCEDURE TTEView.DoSetPageOffset(coord: VPoint); OVERRIDE;
- { At printing time, determine the location of the 'interior' (body)
- of the page }
-
- PROCEDURE TTEView.GetPrintExtent(VAR printExtent: VRect); OVERRIDE;
- { Print extent is the view's extent minus the insets. }
-
- { Debugging }
-
- PROCEDURE TTEView.IdentifySoftware; OVERRIDE;
- { Tells compile date of this unit }
-
- PROCEDURE TTEView.Fields(PROCEDURE DoToField(fieldName: Str255;
- fieldAddr: Ptr;
- fieldType: INTEGER)); OVERRIDE;
- { Used by the Inspector and the Debugger to display the contents of this class's
- fields. }
-
- END;
-
- TTECommand = OBJECT (TCommand) { A command that adds characters to, or
- delete characters from, a TEView }
-
- fTEView: TTEView; { The TEView operated on }
-
- fHTE: TEHandle; { same as fTEView's fHTE; duplicated for
- code efficiency }
-
- fOldStart: INTEGER; { The beginning position of the selection at
- the moment just before the command was
- done. }
- fOldEnd: INTEGER; { The end position of the selection at the
- moment just before the command was done. }
- fOldText: Handle; { If fOldStart = fOldEnd, i.e., if old
- selection had been an insertion point,
- this will be NIL. Otherwise, provides a
- temporary home for the characters
- comprising the old selection }
- fOldStyles: StScrpHandle;
-
- fNewStart: INTEGER; { The beginning location in the Text of the
- new text that is added by the command, if
- any. }
- fNewEnd: INTEGER; { The ending location in the Text of the new
- text that is added by the command, if any.
- }
- fNewText: Handle; { A Handle to the characters added by the
- command }
- fNewStyles: StScrpHandle;
-
- fPadding: Handle; { Handle to fill size between new and old.
- This insures that we can always undo and
- redo. }
- fTextPad: INTEGER; { Size difference between New and Old text }
- fStylePad: LONGINT; { Size difference between New and Old styles
- }
-
- { Initialize and Free }
-
- PROCEDURE TTECommand.ITECommand(itsTEView: TTEView;
- itsCmdNumber: CmdNumber;
- itsSaveText: BOOLEAN);
- { Initialize the command; if unsuccessful, exit is via Failure mechanism. }
-
- PROCEDURE TTECommand.Free; OVERRIDE;
- { Free the text handles holding information needed for Undo/Redo, then Frees SELF }
-
- { Command execution phase overrides }
-
- PROCEDURE TTECommand.DoIt; OVERRIDE;
- { Focuses, then calls DoMainFunction }
-
- PROCEDURE TTECommand.RedoIt; OVERRIDE;
- { Focuses, calls RestoreSelection to get selection right, then calls DoMainFunction
- to reinstate the changes done in DoIt which were undone by a preceding UndoIt }
-
- PROCEDURE TTECommand.UndoIt; OVERRIDE;
- { Focuses, then dispatches to RemoveAdditions, ReviveDeletions, and RestoreSelection
- to accomplish the Undo }
-
- { Command execution - Restoration of Selection -- called in both UNDO and REDO phases
- }
-
- PROCEDURE TTECommand.RestoreSelection;
- { Set the Selection to be what it was just before the DO phase of the command was
- performed }
-
- { Command execution - steps in DO and REDO phases }
-
- PROCEDURE TTECommand.BanishOldText;
- { Remove text that was selected at the outset of the Do phase }
-
- PROCEDURE TTECommand.InstallNewText;
- { Install the new text }
-
- PROCEDURE TTECommand.DoMainFunction;
- { Forwards to the relevant methods for Do and Redo phases }
-
- { Command execution - steps in UNDO phase }
-
- PROCEDURE TTECommand.RemoveAdditions;
- { Remove any characters which were added by the DO phase of the command }
-
- PROCEDURE TTECommand.ReviveDeletions;
- { Bring back the characters which were removed during the DO phase }
-
- { Debugging }
-
- PROCEDURE TTECommand.Fields(PROCEDURE
- DoToField(fieldName: Str255;
- fieldAddr: Ptr;
- fieldType: INTEGER)); OVERRIDE;
- { Used by the Inspector and the Debugger to display the contents of this class's
- fields. }
-
- END;
-
- TTECutCopyCommand = OBJECT (TTECommand) { Command for handling Cut & Copy for the
- TEView. }
- fClipCreated: BOOLEAN; { Clipboard view created OK }
-
- { Creation and Destruction }
-
- PROCEDURE TTECutCopyCommand.ITECutCopyCommand(itsTEView: TTEView;
- itsCmdNumber: CmdNumber);
- { Initializes the command }
-
- PROCEDURE TTECutCopyCommand.Free; OVERRIDE;
- { Free the command }
-
- { Command execution }
-
- PROCEDURE TTECutCopyCommand.DoIt; OVERRIDE;
- { Launches a TEView for installation in the Clipboard, then calls DoMainFunction }
-
- PROCEDURE TTECutCopyCommand.ReviveDeletions; OVERRIDE;
- { Bring back the characters which were removed during the DO phase; called during
- UNDO phase }
-
- { Debugging }
-
- PROCEDURE TTECutCopyCommand.Fields(PROCEDURE
- DoToField(fieldName: Str255;
- fieldAddr: Ptr;
- fieldType: INTEGER)); OVERRIDE;
- { Used by the Inspector and the Debugger to display the contents of this class's
- fields. }
-
- END;
-
- TTEPasteCommand = OBJECT (TTECommand) { Command that handles Pasting for the
- TEView. }
-
- { Initialization }
- PROCEDURE TTEPasteCommand.ITEPasteCommand(itsTEView: TTEView);
- { Initialize the command; if unsuccessful, signalled by Failure mechanism }
-
- { Debugging }
-
- PROCEDURE TTEPasteCommand.Fields(PROCEDURE
- DoToField(fieldName: Str255;
- fieldAddr: Ptr;
- fieldType: INTEGER)); OVERRIDE;
- { Used by the Inspector and the Debugger to display the contents of this class's
- fields. }
-
- END;
-
- TTEStyleCommand = OBJECT (TTECommand) { Command for applying a new style to the
- TEView. }
-
- { These two fields are only used in non-styled TextEdit records }
- fMode: INTEGER; { Mode for style change }
- fOldTextStyle: TextStyle; { The original text style }
- fNewTextStyle: TextStyle; { What we're replacing it with }
-
- { Initialization }
-
- PROCEDURE TTEStyleCommand.ITEStyleCommand(itsTEView: TTEView;
- itsNewStyle: TextStyle;
- itsCmdNumber: CmdNumber;
- itsMode: INTEGER);
- { Initialize the command; if unsuccessful, signalled by Failure mechanism }
-
- { Command execution }
-
- PROCEDURE TTEStyleCommand.InstallOneStyle(newStyl: TextStyle);
- { Installs one style over entire record - for use with old TextEdit }
-
- PROCEDURE TTEStyleCommand.InstallManyStyles(newStyls: StScrpHandle);
- { Installs styles over selection range - for use with styled TextEdit }
-
- PROCEDURE TTEStyleCommand.DoIt; OVERRIDE;
- { Applies style to selection range }
-
- PROCEDURE TTEStyleCommand.UndoIt; OVERRIDE;
- { Undoes the action performed by DoIt. }
-
- PROCEDURE TTEStyleCommand.RedoIt; OVERRIDE;
- { Calls DoIt. }
-
- { Debugging }
- PROCEDURE TTEStyleCommand.Fields(PROCEDURE
- DoToField(fieldName: Str255;
- fieldAddr: Ptr;
- fieldType: INTEGER)); OVERRIDE;
- { Used by the Inspector and the Debugger to display the contents of this class's
- fields. }
-
- END;
-
- TTETypingCommand = OBJECT (TTECommand) { The command that handles typing in a
- TEView. }
- fCompleted: BOOLEAN; { Indicates whether further keystrokes will
- be extensions to this command (FALSE) or
- whether the command has already been
- completed (TRUE) }
- fFirstChar: Char; { First character typed }
-
- { Creation and destruction }
-
- PROCEDURE TTETypingCommand.ITETypingCommand(itsTEView: TTEView;
- itsFirstChar: Char);
- { Initialize the command; if not successful, exit is via Failure mechanism }
-
- PROCEDURE TTETypingCommand.Free; OVERRIDE;
- { Deallocate the command and dependent structures }
-
- { Command processing }
-
- PROCEDURE TTETypingCommand.DoNormalChar(aChar: Char);
- { Handle any typed character except a backspace }
-
- PROCEDURE TTETypingCommand.BkSpcLeft(theText: Handle;
- curStart: INTEGER);
- { Handle backspace to the left of the original selection }
-
- PROCEDURE TTETypingCommand.BkSpcRight(theText: Handle;
- curStart: INTEGER);
- { Handle backspace to the right of the original selection }
-
- PROCEDURE TTETypingCommand.FwdDelete(theText: Handle;
- curStart, curEnd: INTEGER);
- { Handle forward delete }
-
- PROCEDURE TTETypingCommand.AddCharacter(aChar: Char);
- { Add another character to an already-launched TETypingCommand }
-
- PROCEDURE TTETypingCommand.DoIt; OVERRIDE;
- { First processing for command; adds first character }
-
- PROCEDURE TTETypingCommand.RedoIt; OVERRIDE;
- { Handles undoing forward backspace}
-
- PROCEDURE TTETypingCommand.UndoIt; OVERRIDE;
- { Process undo typing }
-
- PROCEDURE TTETypingCommand.CompleteTyping;
- { Mark as no more typing allowed and fix up style scrap, if any }
-
- { Debugging }
-
- PROCEDURE TTETypingCommand.Fields(PROCEDURE
- DoToField(fieldName: Str255;
- fieldAddr: Ptr;
- fieldType: INTEGER)); OVERRIDE;
- { Used by the Inspector and the Debugger to display the contents of this class's
- fields. }
-
- END;
-
- {--------------------------------------------------------------------------------------------------}
-
- VAR
- gDefClikLoopProc: ProcPtr; { Standard TextEdit click loop routine }
-
- { The following are considered private, but appear in the interface in case you need to
- override a method that uses one of these. }
-
- pCurrTEView: TTEView; { For the benefit of ClikLoopForTTEView only }
- {$IFC qDebug}
- pTEIntenseDebugging: BOOLEAN;
- {$ENDC}
-
- {--------------------------------------------------------------------------------------------------}
-
- PROCEDURE InitUTEView;
- { Initialize TEView unit. }
-
- PROCEDURE SetSelect(theStart, theEnd: INTEGER;
- hTE: TEHandle);
- { For those times when we don't want the selection range hilited when changed }
-
- FUNCTION ClickLoopForTTEView: BOOLEAN;
- { Called from TextEdit when the mouse is down forwards to TTEView.ClikLoop so that
- autoscrolling may be done. }
-
- PROCEDURE DumpTERecord(aTEH: TEHandle);
- { writes salient information about the TERecord out to the Debug window }
-
- PROCEDURE DumpTTECommand(theTTECommand: TTECommand);
- { writes TTECommand info out to Debug window }
- {$ENDC}
-
- {$IFC NOT UsingIncludes}
- END.
- {$ENDC}
-